/*
 * @lc app=leetcode.cn id=412 lang=typescript
 *
 * [412] Fizz Buzz
 */

// @lc code=start
function fizzBuzz(n: number): string[] {
    return [...Array(n).keys()].map((i) => {
        i = i + 1;
        let result = "";
        if (!(i % 3)) {
            result += "Fizz";
        }
        if (!(i % 5)) {
            result += "Buzz";
        }

        return result === "" ? i.toString() : result;
    });
}
// @lc code=end
